//
//  CESettingsCell.m
//  digitalCurrency
//
//  Created by 默认账户 on 2019/4/3.
//  Copyright © 2019 XinHuoKeJi. All rights reserved.
//

#import "CTQGCell.h"

@interface CTQGCell()

@end

@implementation CTQGCell

+ (instancetype)createTableView:(UITableView *)tableView {
    CTQGCell *cell = [tableView dequeueReusableCellWithIdentifier:@"qgcell"];
    cell.selectionStyle  = UITableViewCellSelectionStyleNone;
    cell.backgroundColor = [UIColor whiteColor];
    [cell makeViews];
    
    return cell;
}

- (void)makeViews {
    
    [self.bgView removeFromSuperview];
    self.bgView = [[UIView alloc]initWithFrame:CGRectMake(25, 6, kWindowW-50, 60)];
    [self addSubview:self.bgView];
    self.bgView.backgroundColor = [UIColor whiteColor];
    self.bgView.layer.cornerRadius = 6.0;
    self.bgView.layer.shadowColor = [UIColor colorWithHEX:@"6E6E6E"].CGColor;
    self.bgView.layer.shadowOffset = CGSizeMake(0, 0);
    self.bgView.layer.shadowOpacity = 0.21;
    
    [self.bgView addSubview:self.coinName];
    [self.coinName mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.mas_equalTo(10);
    }];
    
    [self.bgView addSubview:self.coinNumber];
    [self.coinNumber mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(0);
        make.right.mas_equalTo(-15);
    }];
    
    [self.bgView addSubview:self.createTime];
    [self.createTime mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-13);
        make.left.mas_equalTo(15);
    }];
    
//    UIView *line = [[UIView alloc] init];
//    [self.contentView addSubview:line];
//    line.backgroundColor = [UIColor colorWithHEX:@"626262"];
//    [line mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.top.mas_equalTo(59);
//        make.left.mas_equalTo(12);
//        make.right.mas_equalTo(-12);
//        make.height.mas_equalTo(1);
//    }];
}

- (UILabel *)coinName {
    if (!_coinName) {
        _coinName = [[UILabel alloc] init];
        _coinName.text = @"DWTT";
        _coinName.textColor = tThreeColor;
        _coinName.font = [UIFont systemFontOfSize:15];
    }
    
    return _coinName;
}

- (UILabel *)coinNumber {
    if (!_coinNumber) {
        _coinNumber = [[UILabel alloc] init];
        _coinNumber.text = @"--";
        _coinNumber.textColor = [UIColor colorWithHEX:@"#375880"];
        _coinNumber.font = [UIFont systemFontOfSize:11];
        _coinNumber.textAlignment = NSTextAlignmentRight;
        
    }
    
    return _coinNumber;
}

- (UILabel *)createTime {
    if (!_createTime) {
        _createTime = [[UILabel alloc] init];
        _createTime.text = @"--";
        _createTime.textColor = tThreeColor;
        _createTime.font = [UIFont systemFontOfSize:12];
        _createTime.textAlignment = NSTextAlignmentRight;
    }
    
    return _createTime;
}
    

@end
